﻿<!--
// This source is subject to Microsoft Public License (Ms-PL).
// Please see http://taskcardcreator.codeplex.com for details.
// All other rights reserved.
-->
<Window x:Class="TaskCardCreator.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controlLibrary="clr-namespace:WpfControlLibrary;assembly=WpfControlLibrary"
        Title="Scrum Task Board Card Creator" Height="702" Width="722" ResizeMode="CanResize">
  <TabControl Name="tabControl">
    <TabItem Header="Setup">
      <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel>
          
          <TextBlock Margin="10,5" FontSize="20">1. Connect to a TFS 2010 Server:</TextBlock>
          <Button Margin="10,5" Height="33" HorizontalAlignment="Left" Name="selectProjectButton" VerticalAlignment="Top" Width="180" Click="selectProjectButton_Click" >
            <StackPanel Orientation="Horizontal">
              <Image Width="33" Height="35" Source="Resources/vs.png"></Image>
              <TextBlock VerticalAlignment="Center" Margin="5,0">Click to select server</TextBlock>
            </StackPanel>
          </Button>

          <TextBlock Margin="10,5" FontSize="20">2. Select Work Item Query:</TextBlock>
          <controlLibrary:WorkItemsQueriesControl Margin="10,5" Height="150" HorizontalAlignment="Stretch" Name="queries"  />

          <TextBlock Margin="10,5" FontSize="20">3. Select Work Items:</TextBlock>
          <Grid>
            <ListView Margin="10,5" Height="200" ItemsSource="{Binding WorkItems}" Name="listView" HorizontalAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Visible">
              <ListView.View>
                <GridView>
                  <GridViewColumn Width="50" Header="Id" DisplayMemberBinding="{Binding Id}"  />
                  <GridViewColumn Width="500" Header="Title" DisplayMemberBinding="{Binding Title}" />
                  <GridViewColumn Width="90" Header="State" DisplayMemberBinding="{Binding State}" />
                </GridView>
              </ListView.View>
            </ListView>
            <StackPanel VerticalAlignment="Center" Name="progress" Visibility="Collapsed">
              <ProgressBar HorizontalAlignment="Center" IsIndeterminate="True" Margin="5" Width="100" Height="20"></ProgressBar>
              <TextBlock HorizontalAlignment="Center">Loading...</TextBlock>
            </StackPanel>
          </Grid>

          <TextBlock Margin="10,5" FontSize="20">4. Generate Report:</TextBlock>

          <Button Height="45" Width="60" Margin="10,0,0,0" Name="generateReportButton" HorizontalAlignment="Left" Click="generateReport_Click" >
            <Image Width="33" Height="35" Source="Resources/Printer.png"></Image>
          </Button>

        </StackPanel>
      </ScrollViewer>
    </TabItem>
    <TabItem Header="About...">
      <StackPanel>
        <TextBlock Margin="25" FontSize="15" HorizontalAlignment="Center">
          <Hyperlink NavigateUri="http://taskcardcreator.codeplex.com/" RequestNavigate="Hyperlink_RequestNavigate">http://taskcardcreator.codeplex.com/</Hyperlink>
        </TextBlock>
        <TextBlock Margin="25" FontSize="15" HorizontalAlignment="Center">Version 2.5.1.0</TextBlock>
        <Button Name="CheckForUpdatesButton" Margin="25" FontSize="15" Content="Check for updates" HorizontalAlignment="Center" Click="CheckForUpdatesButton_Click" />
      </StackPanel>
    </TabItem>
  </TabControl>
</Window>